package com.foryou.system;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@EnableDiscoveryClient
//@EnableFeignClients(basePackages={
//		"com.foryou.wechat.client.PlaceClient",
//		"com.foryou.wechat.client.ProductionClient",
//		"com.foryou.wechat.client.ShootClient",
//		"com.foryou.wechat.client.UserBackClient",
//		"com.foryou.wechat.client.UserClient"}
//		)
//@ComponentScan(basePackages = "com.foryou")
//@MapperScan(basePackages = {"com.foryou.system.modules.sys.dao"}) //扫描DAO
public class CloudSystemApplication {

	public static void main(String[] args) {
		SpringApplication.run(CloudSystemApplication.class, args);
	}

	@Bean
	@LoadBalanced
	RestTemplate restTemplate() {
		return new RestTemplate();
	}
}
